package cn.schoolwow.quickserver.request;

import cn.schoolwow.quickserver.domain.HttpRequestMeta;

import java.net.HttpCookie;
import java.net.URI;
import java.util.List;

public class HttpRequestImpl implements HttpRequest {
    private HttpRequestMeta httpRequestMeta;

    public HttpRequestImpl(HttpRequestMeta httpRequestMeta) {
        this.httpRequestMeta = httpRequestMeta;
    }

    @Override
    public String ip() {
        return httpRequestMeta.ip;
    }

    @Override
    public URI uri() {
        return httpRequestMeta.uri;
    }

    @Override
    public String method() {
        return httpRequestMeta.method;
    }

    @Override
    public String protocol() {
        return httpRequestMeta.protocol;
    }

    @Override
    public String charset() {
        return httpRequestMeta.charset;
    }

    @Override
    public List<HttpCookie> cookieList() {
        return httpRequestMeta.cookieList;
    }
}
